<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <input type="text">
</body>

</html>
<script>
    const inEle = document.querySelector('input')
    function fn() {
        console.log("防抖，防抖，我是节流，有内奸，停止交易，收到请回答");
    }
    function sss(ssss, tttt) {
        let timerid = null
        return function () {
            if (!timerid) {
                timerid = setTimeout(() => {
                    ssss()
                    clearTimeout(timerid)
                    timerid = null
                },tttt)
            }
        }
    }
    inEle.oninput=sss(fn,1000)
</script>